﻿@using KPIS.GERP.WEB.GFMS.Class
	
@{
	var user = GimsMembership.User;
	var employee = user == null ? null : user.Employee;
	string imageUnique = null;
	string empName = GimsMembership.CurrentUserName;
	if(employee != null)
	{
		imageUnique = employee.ImageUnique;
		empName = employee.FullName;
	}
} 
<!--start header-->
<div class="navbar navbar-inverse">
	<div class="navbar-inner">
		<div class="container-fluid">
			<a href="@Url.Action("Index", "Home")" class="brand">
				<small>
					<i class="icon-inbox"></i>
					บัญชี - @GimsConfigReader.SystemName
				</small>
			</a><!--/.brand-->
			<ul class="nav ace-nav pull-right">
                <!--
                <li class="grey">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">
						<i class="icon-tasks"></i>
						<span class="badge badge-grey">4</span>
					</a>
					<ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-closer">
						<li class="nav-header">
							<i class="icon-ok"></i>
							4 Tasks to complete
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">Software Update</span>
									<span class="pull-right">65%</span>
								</div>
								<div class="progress progress-mini ">
									<div style="width: 65%" class="bar"></div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">Hardware Upgrade</span>
									<span class="pull-right">35%</span>
								</div>
								<div class="progress progress-mini progress-danger">
									<div style="width: 35%" class="bar"></div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">Unit Testing</span>
									<span class="pull-right">15%</span>
								</div>
								<div class="progress progress-mini progress-warning">
									<div style="width: 15%" class="bar"></div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">Bug Fixes</span>
									<span class="pull-right">90%</span>
								</div>
								<div class="progress progress-mini progress-success progress-striped active">
									<div style="width: 90%" class="bar"></div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">See tasks with details
								<i class="icon-arrow-right"></i>
							</a>
						</li>
					</ul>
				</li>
				<li class="purple">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">
						<i class="icon-bell-alt icon-only icon-animated-bell"></i>
						<span class="badge badge-important">8</span>
					</a>
					<ul class="pull-right dropdown-navbar navbar-pink dropdown-menu dropdown-caret dropdown-closer">
						<li class="nav-header">
							<i class="icon-warning-sign"></i>
							8 การแจ้งเตือน
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">
										<i class="btn btn-mini no-hover btn-pink icon-comment"></i>
										New Comments
									</span>
									<span class="pull-right badge badge-info">+12</span>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<i class="btn btn-mini btn-primary icon-user"></i>
								Bob just signed up as an editor ...
							</a>
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">
										<i class="btn btn-mini no-hover btn-success icon-shopping-cart"></i>
										New Orders
									</span>
									<span class="pull-right badge badge-success">+8</span>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">
										<i class="btn btn-mini no-hover btn-info icon-twitter"></i>
										Followers
									</span>
									<span class="pull-right badge badge-info">+11</span>
								</div>
							</a>
						</li>
						<li>
							<a href="#">แสดงการแจ้งเตือนเพิ่มเติม...
								<i class="icon-arrow-right"></i>
							</a>
						</li>
					</ul>
				</li>-->
                <li class="grey"  title="งานค้างในระบบ (@KPIS.GERP.Models.Class.ConvertUtility.ConvertOrDefaultObjectInt(ViewBag.UnreadTaskMessageCount)  งาน)">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">
						<i class="icon-tasks"></i>
						<span class="badge badge-grey">@KPIS.GERP.Models.Class.ConvertUtility.ConvertOrDefaultObjectInt(ViewBag.UnreadTaskMessageCount)</span>
					</a>
					<ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-closer">
						<li class="nav-header">
							<i class="icon-ok"></i>
							@KPIS.GERP.Models.Class.ConvertUtility.ConvertOrDefaultObjectInt(ViewBag.UnreadTaskMessageCount) งานรออนุมัติ
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">Software Update</span>
									<span class="pull-right">65%</span>
								</div>
								<div class="progress progress-mini ">
									<div style="width: 65%" class="bar"></div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">Hardware Upgrade</span>
									<span class="pull-right">35%</span>
								</div>
								<div class="progress progress-mini progress-danger">
									<div style="width: 35%" class="bar"></div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">Unit Testing</span>
									<span class="pull-right">15%</span>
								</div>
								<div class="progress progress-mini progress-warning">
									<div style="width: 15%" class="bar"></div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">
								<div class="clearfix">
									<span class="pull-left">Bug Fixes</span>
									<span class="pull-right">90%</span>
								</div>
								<div class="progress progress-mini progress-success progress-striped active">
									<div style="width: 90%" class="bar"></div>
								</div>
							</a>
						</li>
						<li>
							<a href="#">See tasks with details
								<i class="icon-arrow-right"></i>
							</a>
						</li>
					</ul>
				</li>
				<li class="green" title="ยังไม่ลงระบบ">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#"  style="cursor:wait">
						<i class="icon-envelope-alt icon-only icon-animated-vertical"></i>
						<span class="badge badge-success">
							@KPIS.GERP.Models.Class.ConvertUtility.ConvertOrDefaultObjectInt(ViewBag.UnreadMessageCount)
						</span>
					</a>
					<ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-closer">
						<li class="nav-header">
							<i class="icon-envelope"></i>
							5 ข้อความ
						</li>
						<li>
							<a href="#">
								<img src="~/Content/Ace/assets/avatars/avatar.png" class="msg-photo" alt="Alex's Avatar" />
								<span class="msg-body">
									<span class="msg-title">
										<span class="blue">Alex:</span>
										Ciao sociis natoque penatibus et auctor ...
									</span>

									<span class="msg-time">
										<i class="icon-time"></i>
										<span>a moment ago</span>
									</span>
								</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="~/Content/Ace/assets/avatars/avatar3.png" class="msg-photo" alt="Susan's Avatar" />
								<span class="msg-body">
									<span class="msg-title">
										<span class="blue">Susan:</span>
										Vestibulum id ligula porta felis euismod ...
									</span>
									<span class="msg-time">
										<i class="icon-time"></i>
										<span>20 minutes ago</span>
									</span>
								</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="~/Content/Ace/assets/avatars/avatar4.png" class="msg-photo" alt="Bob's Avatar" />
								<span class="msg-body">
									<span class="msg-title">
										<span class="blue">Bob:</span>
										Nullam quis risus eget urna mollis ornare ...
									</span>
									<span class="msg-time">
										<i class="icon-time"></i>
										<span>3:15 pm</span>
									</span>
								</span>
							</a>
						</li>
						<li>
							<a href="#">แสดงข้อความทั้งหมด
								<i class="icon-arrow-right"></i>
							</a>
						</li>
					</ul>
				</li>

				<li class="light-blue user-profile">
					<a data-toggle="dropdown" href="#" class="user-menu dropdown-toggle">
						<img src="@Url.Action("ImagesByName", "File", new {imageName = imageUnique })" class="nav-user-photo" 
							alt="รูปของ @empName" />
						<span id="user_info">
							@empName
						</span>
						<i class="icon-caret-down"></i>
					</a>
					<ul class="pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-closer" id="user_menu">
						<li>
							<a href="@Url.Action("Settings", "Member")">
								<i class="icon-cog"></i>
								ตั้งค่า
							</a>
						</li>
						<li>
							<a href="@Url.Action("Profiles", "Member")">
								<i class="icon-user"></i>
								ประวัติส่วนตัว
							</a>
						</li>

						<li class="divider"></li>
						<li>
							<a href="@Url.Action("LogOff", "Home")">
								<i class="icon-off"></i>
								ออกจากระบบ
							</a>
						</li>
					</ul>
				</li>
			</ul><!--/.ace-nav-->
		</div><!--/.container-fluid-->
	</div>	<!--/.navbar-inner-->
</div><!--/.end-header-->